<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!--针对IE浏览器，使其运行最新的渲染模式-->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!--获取物理宽度，缩放比例1：1-->
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>好友动态圈</title>
    <!-- Bootstrap -->
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <link href="__PUBLIC__/Css/Friends.css" rel="stylesheet">
</head>
<body> 
<div class="container-fluid">
    <nav class="row navbar-fixed-top" id="nav">
        <div class="col-xs-2">
            <button class="btn btn-default" type="submit" id="btn1">
                <a href="__MODULE__/user/user"><span class='glyphicon glyphicon-menu-left' aria-hidden="true"></span></a>
            </button>
        </div>
        <div class="col-xs-8 text-center">
            <p>动态</p>
        </div>
        <!-- <div class="col-xs-2" id="menu-image">
            <button id="chooseImage" class="btn btn-default" type="submit">
                <a href="__MODULE__/comment/comment"><span  class='glyphicon glyphicon-camera' aria-hidden="true"></span></a>
            </button>
        </div> -->
    </nav>
   <div class="row" id="headerimg">
    <div class="container-fluid" id="headermain">
        <div class="col-xs-3"><img src="__PUBLIC__/Images/head.png" class="img-circle " id="head"></div>
         <div class="col-xs-7"><p id="nickname">{$Think.session.username}</p></div> 
        <div class="col-xs-2"><p id="message" class='glyphicon glyphicon-menu-right' aria-hidden="true"></p></div>
    </div>
     </div>
</div>
<foreach name="res" item="arr">
    <div class="container msg">
        <div class="row">
            <div class="media">
                <div class="media-left">
                    <a href="">
                        <img class="img-circle media-object" src="__PUBLIC__/Images/user.png" width="60px" height="60px">
                    </a>
                </div>
                 <div class="media-body text-justify">
                    <h4 class="media-heading">{$arr.buss}</h4><!-- 商家 -->
                    <h5>来自：{$arr.address}</h5>
                </div>
                <h4 class="text-indent:2em">{$arr.context}</h4>
                <div class='row'>
               <notempty name="arr.image"><!-- 判断不为空 -->
                 <div class='col-xs-4'> 
                    <img class="img-circle media-object" src="__PUBLIC__/Images/{$arr.image|substr=0,9}.png" width="80px" height="80px">
                    </div> 
                </notempty>
                    
                                   
                </div>
                <h5>{$arr.time}</h5> 
                <a type="button" class="btn btn-default more" data-container="body" data-toggle="popover" data-placement="left" data-content="点赞 | 转发 | 评论 ">
                    <span class='glyphicon glyphicon-option-horizontal' aria-hidden="true"></span>
                </a>
            </div>
        </div>
    </div> 
</foreach>

<script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/Js/Friends.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script >
$(function(){
wx.config({
    debug: false,
    appId: 'wx603db1a9748a186b',
    timestamp: '{$signPackage.timestamp}',
    nonceStr: '{$signPackage.nonceStr}',
    signature: '{$signPackage.signature}',
    jsApiList: [
        'chooseImage',
        'uploadImage'
    ]
});

  // 5.1 拍照、本地选图
  var images = {
    localId: [],
    serverId: []
  };
document.querySelector('#chooseImage').onclick = function () {
  
    wx.chooseImage({
      success: function (res) {
        images.localId = res.localIds;
        alert('已选择 ' + res.localIds.length + ' 张图片');
      },
      error:function(res){
        alert(22)
      }
    });
  };

 }); 
</script>
</body>
</html>